Skip to content

knip include classMember#263

Merged
artemdemo merged 2 commits intomainfrom
knip-classMembers
Feb 18, 2026
Merged

knip include classMember#263
artemdemo merged 2 commits intomainfrom
knip-classMembers

Conversation

@artemdemo
Copy link
Contributor

@artemdemo artemdemo commented Feb 18, 2026

Note

Description

This PR enables Knip's classMembers analysis to detect unused class properties and methods, then removes all unused class members identified by this check. This improves code maintainability by eliminating dead code in error classes and test utilities.

Related Issue

Followup for this comment: #249 (comment)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • Added "classMembers" to Knip's include configuration (knip.json:3)
  • Removed unused getSessionId() method from ErrorReporter class (src/cli/telemetry/error-reporter.ts:48-55)
  • Removed unused entityName property from TypeGenerationError class (src/core/errors.ts:459,472)
  • Removed unused mock methods from Base44APIMock test utility: mockConnectorOAuthStatus(), mockTokenError(), mockUserInfoError() (tests/cli/testkit/Base44APIMock.ts)
  • Removed unused assertion methods from CLIResultMatcher test utility: toHaveExitCode(), toContainInStdout(), toContainInStderr() (tests/cli/testkit/CLIResultMatcher.ts)

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed (N/A - removing unused code)
  • All tests pass (npm test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (N/A - removing code)
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated docs/ (AGENTS.md) if I made architectural changes (N/A - no architectural changes)

Additional Notes

This is a pure cleanup PR that removes dead code without affecting functionality. The Knip configuration change enables ongoing detection of unused class members to prevent future code bloat.


🤖 Generated by Claude | 2026-02-18 14:33 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.32-pr.263.e9891b4

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.32-pr.263.e9891b4"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.32-pr.263.e9891b4"
  }
}

Preview published to npm registry — try new features instantly!

@artemdemo artemdemo marked this pull request as ready for review February 18, 2026 14:31
@artemdemo artemdemo requested a review from kfirstri February 18, 2026 14:31
@github-project-automation github-project-automation bot moved this from Backlog to In review in CLI Development Feb 18, 2026
@artemdemo artemdemo merged commit 289443f into main Feb 18, 2026
9 checks passed
@artemdemo artemdemo deleted the knip-classMembers branch February 18, 2026 14:34
@github-project-automation github-project-automation bot moved this from In review to Done in CLI Development Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants

Comments